<template>
  <view>
      <view class="device_introduce">
      <view class="image-box">
      <image :src="baseUrl+equipmentTypeImgUrl" mode="aspectFit"></image>
      </view>
      <view class="introduce_text">
        <view class="introduce_title">
          {{equipmentTypeName}}
        </view>
        <view class="equipmentType_introduce">
          {{describe}}
        </view>
      </view>
      <view class="order_btn">
        <button type="primary" @tap="makeOrder(equipmentTypeId,equipmentTypeImgUrl)">申请下单</button>
      </view>
    </view>
  </view>
</template>

<script>
  import config from '@/config'
  export default {
    data() {
      return {
        baseUrl: config.baseUrl,
        equipmentTypeId: "",
        equipmentTypeImgUrl: "",
        equipmentTypeName:"",
        describe:""
        }
    },
    onLoad(option) {
      this.equipmentTypeId = option.equipmentTypeId
      this.equipmentTypeImgUrl = option.equipmentTypeImgUrl
      this.equipmentTypeName = option.equipmentTypeName
      this.describe= option.describe
    },
    methods: {
      makeOrder(equipmentTypeId,equipmentTypeImgUrl){
            this.$tab.navigateTo('../../productIntroduction/detailed/index?equipmentTypeId=' +equipmentTypeId+"&equipmentTypeImgUrl="+equipmentTypeImgUrl)
      }
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #ffffff;
  }
.image-box{
  text-align: center;
  margin-top:40rpx;
}
.introduce_text{
  margin: 80rpx 40rpx 0 40rpx;
}
.introduce_title{
  font-size: 36rpx;
  font-weight: bold;
}
.equipmentType_introduce{
  margin-top: 16rpx;
  white-space: normal;
  word-break: break-all;
  font-size: 24rpx;
}
.order_btn{
  position: fixed;
  bottom: 20rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
}
</style>